# Begin: Custom macros and commands for all e-mails BEFORE processing log(1,'Begin: Custom macros and commands for all e-mails BEFORE processing'); # Begin: Check if e-mail is LFT and user is allowed to send LFT log(1,'Begin: Check if e-mail is LFT and user is allowed to send LFT'); if(!incoming()) { if (!internal()) { if (compareattr('use_lfm','equal','1')) { log(1,'Mail is LFT, check if user is allowed to use'); if (ldap_compare('192.168.10.10;CN=Peter Mueller,OU=Users,OU=MyBusiness,DC=Firma,DC=local;mypassword;OU=Users,OU=MyBusiness,DC=Firma,DC=local;(mail=$sender)','memberOF','LFT-Benutzer')) { # var 1: if (compare('to','match','mail@address')) { # var 2: if (compareattr('connect_from','equal','192.168.139.1')) { log(1,'User is allowed to send large files, proceeding'); } else { log(1,'User is not allowed to send large files, e-mail will be dropped'); drop('500','User is not allowed to send large files'); # var 3: log(1,'User is not allowed to send large files, e-mail will be bounced'); # bounce('bounce_LFT'); # var 4: log(1,'User is not allowed to send large files, e-mail will be sent as "normal" SMTP-mail); # flag('nolfm', true); # flag('x-smlfm', false); # setheader('X-ESWmail-LFM','NO'); } } } } log(1,'End: Check if e-mail is LFT and user is allowed to send LFT'); # End: Check if e-mail is LFT and user is allowed to send LFT log(1,'End: Custom macros and commands for all e-mails BEFORE processing'); # End: Custom macros and commands for all e-mails BEFORE processing